safely With Context Exception Handler
suspend fun <T> safelyWithContextExceptionHandler( contextExceptionHandler: ExceptionHandler<Unit>, safelyExceptionHandler: ExceptionHandler<T> = defaultSafelyExceptionHandler, block: suspend CoroutineScope.() -> T): T
Content copied to clipboard
This method will set new coroutineContext with ContextSafelyExceptionHandler. In case if coroutineContext already contains ContextSafelyExceptionHandler, ContextSafelyExceptionHandler.handler will be used BEFORE contextExceptionHandler in case of exception.
After all, will be called withContext method with created ContextSafelyExceptionHandler and block which will call safely method with safelyExceptionHandler as onException parameter and block as execution block